//==============================================================================
//
// File: CFavoriteList.h
// Project: Browser
// Author(s): Matthias Van Eeghem (matthias@van-eeghem.com)
// License: See LICENSE in root directory
//
// This class holds all methods related to the favorites list. This list holds all
// of the favorite servers of the user.
//
//==============================================================================

#ifndef CFAVORITESLIST_H
#define CFAVORITESLIST_H

#include "MainWindow.h"

class CFavoriteList
{
    // Holds the reference to the MainWindow
    static MainWindow * m_pMainWindow;

    public:
    // Initialise the favorites list, this function performs a couple of actions
    // on the favorites list TreeView.
    static void InitialiseFavoritesList(MainWindow * parent);
    // This method adds a server to the favorites list
    static void AddFavorite(QString serverIP, bool addToRegistry);
    // This method loads all favorites from the registry and add them to the
    // favorites treeview list.
    static void LoadFavorites();
    // This method removes the currently selected item on the QTreeView favorites list
    static void RemoveCurrentlySelectedItem();
    // This method checks whether or not the favorite already exists
    static bool DoesFavoriteExist(QString serverIP);
};

#endif // CFAVORITESLIST_H
